<cfsilent>
<!---
Copyright: (c) 2006 The MachBlog Authors
Authors: Matt Woodward (mpwoodward@gmail.com) & Peter J. Farrell (pjf@maestropublishing.com)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. 
You may obtain a copy of the License at 

http://www.apache.org/licenses/LICENSE-2.0 

Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS, 
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
See the License for the specific language governing permissions and 
limitations under the License.

$Id: mach-ii.xml 95 2006-01-22 17:26:00Z pfarrell $

Notes:
--->
	<cfscript>
		variables.exception = event.getArg("exception");
		// Get eventParameter
		variables.eventParameter = getProperty("eventParameter");
		// Get application name
		variables.appName = getProperty("AppName");
		// Get Main Event if available
		if (event.isArgDefined("exceptionEvent")) {
			variables.mainEvent = event.getArg("exceptionEvent").getArg("mainEvent");
		} else {
			variables.mainEvent = event.getArg("mainEvent");
		} // END ELSE
		event.setArg("meta.title", "#getProperty("resourceBundleService").getResourceBundle().getResource("exception")#" & getProperty("titleSuffix"));
	</cfscript>
</cfsilent>
<!-- Served with text/html (otherwise most browsers will the tan screen of death with cfdump and the page served as application+xml -->
<cfcontent type="text/html" />
<cfoutput>
<h3>Exception &ndash; #variables.appName#</h3>
<table>
	<tr>
		<td><h3>Main Event</h3></td>
		<td><p>#variables.mainEvent#</p></td>
	</tr>
	<tr>
		<td><h3>Message</h3></td>
		<td><p>#variables.exception.getMessage()#</p></td>
	</tr>
	<tr>
		<td><h3>Detail</h3></td>
		<td><p><cfif NOT Len(variables.exception.getDetail())>&nbsp;<cfelse>#variables.exception.getDetail()#</cfif></p></td>
	</tr>
	<tr>
		<td><h3>Extended Info</h3></td>
		<td><p><cfif NOT Len(variables.exception.getExtendedInfo())>&nbsp;<cfelse>#variables.exception.getExtendedInfo()#</cfif></p></td>
	</tr>
	<tr>
		<td><h3>Tag Context</h3></td>
		<td>
			<cfset variables.tagCtxArr = variables.exception.getTagContext() />
			<ul>
			<cfloop index="i" from="1" to="#ArrayLen(variables.tagCtxArr)#">
				<cfset variables.tagCtx = variables.tagCtxArr[i] />
				<li>#variables.tagCtx["template"]# (#variables.tagCtx["line"]#)</li>
			</cfloop>
			</ul>
		</td>
	</tr>
	<tr>
		<td><h3>Caught Exception</h3></td>
		<td><cfdump var="#variables.exception.getCaughtException()#" expand="false" /></td>
	</tr>
</table>
</cfoutput>